<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 交集:什么且什么,贴一起
      满足这两个要求的元素才被选中
      有点想逻辑里面的与
      */
      .rich {
        color: red;
      }
      .penniless {
        color: blue;
      }
      .dog {
        color: aqua;
      }
      .pig {
        color: cadetblue;
      }
      .penniless.dog {
        color: skyblue;
      }
    </style>
  </head>
  <body>
    <div class="rich">张三</div>
    <div class="penniless">李四</div>
    <div class="penniless dog">小狗旺财</div>
    <div class="penniless dog">小猪佩奇</div>
    <p class="penniless">狮子辛巴</p>
    <!--   /* !!!注意css的优先级,如果有冲突,那么后面的会覆盖前面的,但是这个顺序是按照你定义css的顺序而不是你在标签内写的顺序 */ -->
    <div class="rich penniless">狗狗</div>
  </body>
</html>
